
#################################################################
#
#				Warninng!!!!
#				============
#	
# this make file compile all the sources with implicit rules
# therfore in order to make sure all the changes were made 
# run it with "make clean all"
#
##################################################################


# the name of the executable
EXE	= 

# list of all the sources files
SRCS	= \


# compiler 
CC	= g++

# in order to run in debug mode use the command "make DBG=1"
ifdef DBG

	CFLAGS = \
		-DDEBUG	\
		-Werror \ 		
		-Wall 	\		
		-O0	\		
		-g3			
						
else
	CFLAGS = \
		-Wall		\
		-DNDEBUG		 
endif


# linker
LD	= $(CC)
LDFLAGS	=

# each lib should add with -l flag
LIBS = 


# rule to change the suffix of the sources files
OBJS	= ${SRCS:.cpp=.o}

# clear out all suffixes
.SUFFIXES:
# list only those we use
.SUFFIXES: .o .cpp

# define a suffix rule for .cpp -> .o
.cpp.o :
	$(CC) $(CFLAGS) -c $<

##################################
# 	default target 		##
##################################
all : $(EXE)

$(EXE) : $(OBJS)
	$(LD) $(LDFLAGS) $(LIBS) -o $@ $(OBJS)

$(OBJS) : 

.PHONY:
clean :
	rm -f $(EXE) $(OBJS)
